﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Migrator.Entities;
using Migrator.Util;

namespace Migrator.Packets
{
    /// <summary>
    /// Represents an ICMP packet
    /// </summary>
    public class ICMPPacket : IPPacket
    {
        public ICMPPacket(Node source, IPAddress destinationIP, int type, int code)
            : base(source, destinationIP)
        {
            this.Type = type;
            this.Code = code;

            // ICMP is protocol nº 1
            this.Protocol = 1;
        }

        /// <summary>
        /// ICMP packet type
        /// </summary>
        public int Type
        {
            get;
            set;
        }

        /// <summary>
        /// Further specification of the ICMP type
        /// </summary>
        public int Code
        {
            get;
            set;
        }
    }
}
